<script setup>
import { useCounterStore } from '@/pinia_s'
const counter = useCounterStore()
counter.increment()
counter.$subscribe((mutation, state) => {
    console.log(mutation)
    console.log(state)
})
</script>


<template>
    <!-- 直接从 store 中访问 state -->
    <div>Current Count: {{ counter.count }}</div>
    <input type="text" v-model="counter.count">
</template>